import java.awt.*;
import java.util.ArrayList;
import java.util.List;

public class Snake {
    List<Ponit> list;
    public Snake() {
        list = new ArrayList();
        Ponit head = new Ponit(Setting.WIDTH_NUM/2,Setting.HEIGHT_NUM/2-1);
        Ponit body = new Ponit(Setting.WIDTH_NUM/2,Setting.HEIGHT_NUM/2);
        Ponit body2 = new Ponit(Setting.WIDTH_NUM/2,Setting.HEIGHT_NUM/2+1);
        list.add(head);
        list.add(body);
        list.add(body2);
    }
//    吃到食物时添加蛇身
    public void eatFood(int x, int y){
        Ponit p = new Ponit(x, y);
        list.add(p);
    }
}
